package com.example.blog2.mapper;

import com.example.blog2.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserInfoMapper {
    /**
     * 根据用户名查询用户信息
     * @param username
     * @return
     */
    @Select("select * from user where user_name = #{username}")
    UserInfo selectByName(String username);

    @Select("select * from user where id = #{id}")
    UserInfo selectById(Integer id);
}
